#include "bishop.h"
#include "src/move.h"
#include "src/constants.h"

Bishop::Bishop( int x, int y, QString pixmap_path, int color, QGraphicsItem* parent ) : BoardFigure( x, y, pixmap_path, color, parent )
{
}

QList<Move*>& Bishop::getPossibleMoves( BoardFigure* board[8][8] ) {
  qDebug() << "Bishop GetPossibleMoves called";

  if ( possibleMovesReady ) return possibleMoves;

  int dx[] = { 1,  1, -1, -1 };
  int dy[] = { 1, -1, -1,  1 };

  generateMovesFromVectors( dx, dy, 4, board );
  
  possibleMovesReady = true;
  return possibleMoves;
}

